home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS14.ADF
/
Progs
/
PETrans
/
Petrans.doc
< prev
next >
Wrap
Text File
|
1989-01-28
|
3KB
|
76 lines
*** Petrans (PETASCII Translator) for the Amiga ***
*** by James David Walley ***
This is a VERY simple utility that allows you to convert text files
written in PETASCII (often found on Commodore BBSs) to regular ASCII, so
that they can be typed and edited on the Amiga.
PETRANS works using input/output redirection. In case you haven't
read the AmigaDOS manual, all this means is that you specify the input and
output file names on the same line as the command, in this form:
petrans < (inputname) > (outputname)
For example, say you downloaded a file of BBS numbers written in
PETASCII, and named (rather originally) "BBS_numbers". Suppose that you
wanted the file converted to ASCII. You would first decide on a name for
your ASCII file (it can't be the same as the PETASCII one). In a burst of
originality of your own, you decide to name the new file "BBS". You would
then enter the following command at the CLI prompt:
petrans < BBS_numbers > BBS
and the program will take care of the rest.
Technical Notes
--------- -----
The difference between PETASCII and ASCII is that the upper- and
lower-case character sets are switched. In addition, PETASCII has a second
location of the uppercase set, exactly 96 numbers above the first list.
This second location will produce garbage (other character sets, etc.) on
the Amiga, while the first will give you lowercase instead of uppercase,
and any PETASCII lowercase will print on the Amiga as uppercase.
The first thing the program does is convert all CR (carriage returns)
in the file to LF (linefeeds). This is to make it possible to use the type
command and have the text scroll up the screen, instead of continuously
writing to the same screen line.
Following this, PETRANS automatically converts the second uppercase
character set to the first one, getting rid of the "unplanned"
non-alphanumeric characters. Then the upper- and lower-case sets are
reversed, and the file is written to disk in its converted form. All this
will be visible in the C source code for the program.
Acknowledgements
----------------
I want to thank the management and staff at Com-Soft Computers in
Everett, Washington, for letting me work with their C compiler.
As I said before, this is a very simple program, and I'm sure that
many things could be done to give it some bells and whistles. You are of
course welcome to modify the program as much as you want, as long as you
include the C source along with the program, and do not remove my credit
from the source code. Since this is my first C program, I think I should be
allowed my ego trip. (On that subject, if you feel that this program saved
your life, made you rich in the stock market, improved your sex life, etc.,
you are welcome to make an appropriate donation (ten cents?) to James David
Walley, 120 West Casino Road-Apt. 30E, Everett, Washington, 98204. This is
solely so that I can go around telling everyone that I'm a professional
programmer.)
And, if you have a modem, call the Public Domain Silo at:
(206) 775-2650
(206) 347-0243
--James David Walley